<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>FabGL: fabgl::PS2DeviceClass Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">FabGL
   </div>
   <div id="projectbrief">ESP32 VGA Controller and Graphics Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classfabgl_1_1_p_s2_device_class.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classfabgl_1_1_p_s2_device_class-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">fabgl::PS2DeviceClass Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Base class for PS2 devices (like mouse or keyboard).  
 <a href="classfabgl_1_1_p_s2_device_class.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="ps2device_8h_source.html">ps2device.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for fabgl::PS2DeviceClass:</div>
<div class="dyncontent">
<div class="center"><img src="classfabgl_1_1_p_s2_device_class__inherit__graph.png" border="0" usemap="#fabgl_1_1_p_s2_device_class_inherit__map" alt="Inheritance graph"/></div>
<map name="fabgl_1_1_p_s2_device_class_inherit__map" id="fabgl_1_1_p_s2_device_class_inherit__map">
<area shape="rect" id="node2" href="classfabgl_1_1_keyboard_class.html" title="The PS2 Keyboard controller class. " alt="" coords="5,79,153,104"/>
<area shape="rect" id="node3" href="classfabgl_1_1_mouse_class.html" title="The PS2 Mouse controller class. " alt="" coords="178,79,309,104"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a6a3cfd9086abb1d0dda31e5f9c22f40e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enumerations.html#ga209a520f6108c21bd313cb2c98fde74a">PS2Device</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_p_s2_device_class.html#a6a3cfd9086abb1d0dda31e5f9c22f40e">identify</a> ()</td></tr>
<tr class="memdesc:a6a3cfd9086abb1d0dda31e5f9c22f40e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Identifies the device attached to the PS2 port.  <a href="#a6a3cfd9086abb1d0dda31e5f9c22f40e">More...</a><br /></td></tr>
<tr class="separator:a6a3cfd9086abb1d0dda31e5f9c22f40e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c5e9c28380d81e8ca53875e7bf30e5c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_p_s2_device_class.html#a0c5e9c28380d81e8ca53875e7bf30e5c">lock</a> (int timeOutMS)</td></tr>
<tr class="memdesc:a0c5e9c28380d81e8ca53875e7bf30e5c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets exclusive access to the device.  <a href="#a0c5e9c28380d81e8ca53875e7bf30e5c">More...</a><br /></td></tr>
<tr class="separator:a0c5e9c28380d81e8ca53875e7bf30e5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed4e98813779c2d51bd304aef5aed7e9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_p_s2_device_class.html#aed4e98813779c2d51bd304aef5aed7e9">unlock</a> ()</td></tr>
<tr class="memdesc:aed4e98813779c2d51bd304aef5aed7e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Releases device from exclusive access.  <a href="#aed4e98813779c2d51bd304aef5aed7e9">More...</a><br /></td></tr>
<tr class="separator:aed4e98813779c2d51bd304aef5aed7e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Base class for PS2 devices (like mouse or keyboard). </p>
<p><a class="el" href="classfabgl_1_1_p_s2_device_class.html" title="Base class for PS2 devices (like mouse or keyboard). ">PS2DeviceClass</a> connects to one port of the PS2 Controller class (<a class="el" href="classfabgl_1_1_p_s2_controller_class.html" title="The PS2 device controller class. ">fabgl::PS2ControllerClass</a>).<br />
 The PS2 controller uses ULP coprocessor and RTC slow memory to communicate with the PS2 device.<br />
</p>
<p>Applications should not use <a class="el" href="classfabgl_1_1_p_s2_device_class.html" title="Base class for PS2 devices (like mouse or keyboard). ">PS2DeviceClass</a> directly: use instead <a class="el" href="classfabgl_1_1_mouse_class.html" title="The PS2 Mouse controller class. ">fabgl::MouseClass</a> or <a class="el" href="classfabgl_1_1_keyboard_class.html" title="The PS2 Keyboard controller class. ">fabgl::KeyboardClass</a>. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a6a3cfd9086abb1d0dda31e5f9c22f40e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6a3cfd9086abb1d0dda31e5f9c22f40e">&#9670;&nbsp;</a></span>identify()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___enumerations.html#ga209a520f6108c21bd313cb2c98fde74a">PS2Device</a> fabgl::PS2DeviceClass::identify </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Identifies the device attached to the PS2 port. </p>
<dl class="section return"><dt>Returns</dt><dd>The identification ID sent by keyboard. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_keyboard_studio_2_keyboard_studio_8ino-example.html#a1">KeyboardStudio/KeyboardStudio.ino</a>, and <a class="el" href="_mouse_studio_2_mouse_studio_8ino-example.html#a1">MouseStudio/MouseStudio.ino</a>.</dd>
</dl>
</div>
</div>
<a id="a0c5e9c28380d81e8ca53875e7bf30e5c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0c5e9c28380d81e8ca53875e7bf30e5c">&#9670;&nbsp;</a></span>lock()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool fabgl::PS2DeviceClass::lock </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeOutMS</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets exclusive access to the device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">timeOutMS</td><td>Timeout in milliseconds to wait before fail.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the device has been locked. </dd></dl>

</div>
</div>
<a id="aed4e98813779c2d51bd304aef5aed7e9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aed4e98813779c2d51bd304aef5aed7e9">&#9670;&nbsp;</a></span>unlock()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::PS2DeviceClass::unlock </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Releases device from exclusive access. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="ps2device_8h_source.html">ps2device.h</a></li>
<li>ps2device.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>fabgl</b></li><li class="navelem"><a class="el" href="classfabgl_1_1_p_s2_device_class.html">PS2DeviceClass</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
  </ul>
</div>
</body>
</html>
